keyMap ={}
local volume = 0

holdingVolUp = false
holdingVolDown = false


local function volDownPressed()
	holdingVolDown = true
	return 'VOLUME_DOWN_REP'
end

local function volUpPressed()
	holdingVolUp = true
	return 'VOLUME_UP_REP'
end		

---CURSOR

keyMap['cursor_up'] = 'CURSOR_UP'
keyMap['cursor_down'] = 'CURSOR_DOWN'
keyMap['cursor_left'] = 'CURSOR_LEFT'
keyMap['cursor_right'] = 'CURSOR_RIGHT'
keyMap['cursor_ok'] = 'ENTER'

---OPTION
keyMap['back'] = 'BACK'
keyMap['input'] = 'MENU'
keyMap['exit'] = 'EXIT'
keyMap['INFO'] = 'INFO'
keyMap['EPG'] = 'EPG'
keyMap['CHLIST'] = 'CH_LIST'

---COlOR

keyMap['red'] = 'RED'
keyMap['green'] = 'GREEN'
keyMap['blue'] = 'BLUE'
keyMap['yellow'] = 'YELLOW'


---Basic Zapper
keyMap['mute'] =  'MUTE'
--keyMap['VUP'] = function ()
--control.volumeUp()
--volume = control.getVolume ()
--print(volume)
--end

--keyMap['VDW'] = function() 
--control.volumeDown()
--volume = control.getVolume ()
--print(volume)
--end

keyMap['ch_up'] = 'CHANNEL_UP'
keyMap['ch_down'] = 'CHANNEL_DOWN'
keyMap['vol_up'] = 'VOLUME_UP'
keyMap['vol_down'] = 'VOLUME_DOWN'
keyMap['vol_down_rep_start'] = volDownPressed()
keyMap['vol_up_rep_start'] = volUpPressed()
return keyMap
